<include file="Public:header"/>
<div id="main-content">
	<div id="top-alert" class="fixed alert alert-error" style="display: none;">
		<button class="close fixed" style="margin-top: 4px;">&times;</button>
		<div class="alert-content">警告内容</div>
	</div>
	<div id="main" class="main">
		<div class="main-title-h">
			<span class="h1-title">币种管理</span>
		</div>
		<div class="cf">
			<div class="fl">
				<a class="btn btn-success" href="{:U('Config/coinEdit')}">新 增</a>
				<button class="btn ajax-post btn-info" url="{:U('Config/coinStatus',array('type'=>'resume'))}" target-form="ids">启 用</button>
				<button class="btn ajax-post btn-warning" url="{:U('Config/coinStatus',array('type'=>'forbid'))}" target-form="ids">禁 用</button>
				<button class="btn ajax-post confirm btn-danger" url="{:U('Config/coinStatus',array('type'=>'delt'))}" target-form="ids">删 除</button>
				<button class="btn btn-success" onclick="chk_qianbao();">一键检查所有钱包</button>
				<a class="btn btn-inverse" target="_blank" href="{:U('Config/ethsenior')}">ETH钱包高级管理</a>
			</div>
			<div class="search-form fr cf">
				<div class="sleft">
					<form name="formSearch" id="formSearch" method="get" name="form1">
						<select style="width:160px;float:left;margin-right:10px;" name="status" class="form-control">
							<option value="" <empty name="Think.get.status">selected</empty> >全部状态</option>
							<option value="1" <eq name="Think.get.status" value="1">selected</eq> >冻结状态</option>
							<option value="2" <eq name="Think.get.status" value="2">selected</eq> >正常状态</option>
						</select>
						<select style="width:160px;float:left;margin-right:10px;" name="field" class="form-control">
							<option value="name" <eq name="Think.get.field" value="name">selected</eq> >币种简称</option>
							<option value="js_yw" <eq name="Think.get.field" value="js_yw">selected</eq> >英文名称</option>
							<option value="title" <eq name="Think.get.field" value="title">selected</eq> >中文名称</option>
						</select>
						<input type="text" name="name" class="search-input form-control" value="{$Think.get.name}" placeholder="请输入查询内容" style="">
						<a class="sch-btn" href="javascript:;" id="search"> <i class="btn-search"></i> </a>
					</form>
					<script>
						//搜索功能
						$(function () {
							$('#search').click(function () {
								$('#formSearch').submit();
							});
						});
						//回车搜索
						$(".search-input").keyup(function (e) {
							if (e.keyCode === 13) {
								$("#search").click();
								return false;
							}
						});
					</script>
				</div>
			</div>
		</div>
		<div class="data-table table-striped">
			<table class="">
				<thead>
					<tr>
						<th class="row-selected"><input class="check-all" type="checkbox"/></th>
						<th width="5%" class="">ID</th>
						<th width="10%" class="">图标</th>
						<th width="15%" class="">币种简称</th>
						<th width="15%" class="">币种类型</th>
						<th width="25%" class="">钱包服务器</th>
						<th width="10%" class="">排序</th>
						<th width="10%" class="">状态</th>
						<th width="10%" class="">操作</th>
					</tr>
				</thead>
				<tbody>
					<notempty name="list">
						<volist name="list" id="vo">
							<tr>
								<td><input class="ids" type="checkbox" name="id[]" value="{$vo.id}"/></td>
								<td>{$vo.id}</td>
								<td><img src="__UPLOAD__/coin/{$vo.img}" height="18px"/></td>
								<td style="text-transform:uppercase">{$vo.name}</td>
								<td>
									<eq name="vo.token_type" value="1">
										ETH (ERC20)
									<else />
										<eq name="vo.type" value="qbb">钱包币</eq>
										<eq name="vo.type" value="ptb">平台币</eq>
										<eq name="vo.type" value="rgb">认购币</eq>
										<eq name="vo.type" value="rmb">法定货币</eq>
									</eq>
								</td>
								<td>
									<eq name="vo.type" value="qbb">
										<a href="{:U('Config/coinInfo?coin='.$vo['name'])}">钱包信息</a>
										<a href="{:U('Config/coinUser?coin='.$vo['name'])}">所有账号</a>
										<a href="{:U('Config/coinQing?coin='.$vo['name'])}">清空地址</a>
									<else/>
										没有钱包服务器
									</eq>
								</td>
								<td>{$vo.sort}</td>
								<td>
									<eq name="vo.status" value="1"><b style="color: #028E16;">可用</b><else/><b style="color: #F70408">禁用</b></eq>
								</td>
								<td>
									<neq name="vo.name" value="cny">
										<a href="{:U('Config/coinEdit?id='.$vo['id'])}" class="btn btn-primary btn-xs">编辑</a>
									</neq>
								</td>
							</tr>
						</volist>
					<else/>
						<td colspan="12" class="text-center empty-info">Oh! 暂时还没有内容!</td>
					</notempty>
				</tbody>
			</table>
			<div class="page">
				<div>{$page}</div>
			</div>
		</div>
	</div>
</div>
<script type="text/javascript">
	function chk_qianbao() {
		window.location.href = "{:U('Tools/qianbao')}";
	}
</script>
<include file="Public:footer"/>
<block name="script">
	<script type="text/javascript" charset="utf-8">
		//导航高亮
		highlight_subnav("{:U('Config/coin')}");
	</script>
</block>